package com.mk.cloud.pt.controller.app;

import act.apidoc.Description;
import act.controller.Controller;
import act.handler.NonBlock;
import act.util.CacheFor;
import com.mk.cloud.common.domain.PAudio;
import com.mk.cloud.common.enums.GlobalValues;
import com.mk.cloud.common.interceptor.header.HeaderService;
import com.mk.cloud.common.interceptor.header.IHLogin;
import com.mk.cloud.common.util.ResUtils;
import org.osgl.mvc.annotation.GetAction;
import org.osgl.mvc.annotation.With;

import javax.inject.Inject;

@Controller("app/audio")
public class PAudioController extends HeaderService{

    @Inject
    private PAudio.Mapper pAudioMapper;

    @Description("音频--音频详情")
    @With(IHLogin.class)
    @GetAction("getListArtid.json")
    @CacheFor(value = 10 * 60)
    @NonBlock
    public String getListArtid(@Description("文章id") String artid) {
        PAudio audio = new PAudio();
        audio.setArtid(artid);
        audio.setPastatus(GlobalValues.PA_STATUS_2.value());
        return ResUtils.OK(pAudioMapper.template(audio));
    }



}
